package xyy.d3erpapi.utils;

import java.util.ArrayList;
import java.util.List;

public class PageUtil {
    public static final List<List<String>> get(List<String> lists){
        int total = lists.size();
        int pageSize = 200;
        int startIndex = 0;
        List<List<String>> list = new ArrayList<>();
        while (startIndex < total) {
            int endIndex = Math.min(startIndex + pageSize, total);
            List<String> batch = lists.subList(startIndex, endIndex);
            list.add(batch);
            startIndex += pageSize;
        }
        return list;
    }
}
